package com.itheima.stock.mapper;

import com.itheima.stock.pojo.StockRtInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author 80561
* @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
* @createDate 2022-02-12 22:21:33
* @Entity com.itheima.stock.pojo.StockRtInfo
*/
public interface StockRtInfoMapper {

    int deleteByPrimaryKey(String id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);


    /**
     * 涨幅榜
     * 沪深两市个股涨幅分时行情数据查询，以时间顺序和涨幅查询前10条数据
     * @return
     */
    //涨幅榜功能实现
    List<Map> getStockIncrease();

    //涨幅榜更多数据查询
    List<Map> getStockAll();

    //涨停跌数据统计功能
    List<Map> getUpDownLimitCount(@Param("type") int type);

    //个股分时涨跌幅度统计功能
    List<Map> getStockUpDownScope(@Param("lastDateTime")String last);

    //个股分时K线行情功能
    List<Map> getStockScreenMinuteSharing(@Param("stockCode") String stockCode, @Param("tDate") String tDate);

    //个股日K线详情功能
    List<Map> getDayKLinData(@Param("code") String code, @Param("startDate") String hisDateStr);
}
